package svc

import (
	"center/api/internal/config"
	"center/centerrpc/centerrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	CenterRpc centerrpcclient.Centerrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		CenterRpc: centerrpcclient.NewCenterrpc(zrpc.MustNewClient(c.CenterRpc)),
	}
}
